package com.method;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class TestMethodReplacer {
	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		LookupMethodBean bean = ctx.getBean("testBean",LookupMethodBean.class);
		System.out.println(bean.getClass());
		bean.test();
		//调用替换方法结束，bean指代的依然是LookupMethodBean.java
		System.out.println(bean.getClass());
	}
}



